﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace TSCC.WinControl
{
    public partial class ucBtn : UserControl
    {
        [Category("TSCC")]
        [Description("設定Button 所代表的行為"),DefaultValue(CRUDMode.None)]
        public CRUDMode ButtonnMode
        {
            get;
            set;
        }

        [Category("TSCC")]
        [Description("取得和設定顯示文字")]
        public string Caption
        {
            set
            {
                button1.Text = value;
            }
            get
            {
                return button1.Text;
            }
        }   

        public ucBtn()
        {
            InitializeComponent();
            button1.Click += new EventHandler(button1_Click);
        }

        void button1_Click(object sender, EventArgs e)
        {
            this.OnClick(e);
        }
    }
}
